
include ./Makefile.am

all :
	@for dir in $(SUBDIR); do \
		$(MAKE) -C $$dir -f Makefile; \
		if [ $$? -eq 0 ] ; then \
			echo -e "\033[34;1mMAKE IN $$dir OK. \n\033[m"; \
		else \
			echo -e "\033[31;1mWHEN MAKE IN $$dir ERROR OCCUR.\033[m"; \
			break; \
		fi \
	done
clean :
	@for dir in $(SUBDIR); do \
		$(MAKE) -C $$dir -f Makefile clean; \
		if [ $$? -eq 0 ] ; then \
			echo -e "\033[34;1mMAKE CLEAN IN $$dir OK. \n\033[m"; \
		else \
			echo -e "\033[31;1mWHEN MAKE CLEAN IN $$dir ERROR OCCUR.\033[m"; \
			break; \
		fi \
	done
install : all
	@for dir in $(RES_DIR);	do \
		$(MAKE) -C $$dir -f Makefile install; \
		if [ $$? -eq 0 ] ; then \
			echo -e "\033[34;1mMAKE INSTALL IN $$dir OK. \n\033[m"; \
		else \
			echo -e "\033[31;1mWHEN MAKE INSTALL IN $$dir ERROR OCCUR.\033[m"; \
			break; \
		fi \
	done

	#find include -name '*.h' -exec rm -rf {} \;
	#find lib -name '*.a' -exec rm -rf {} \;

